//
//  MSFinghtActionInfo.m
//  MagicSword
//
//  Created by Netease on 15/11/26.
//  Copyright © 2015年 Jonear. All rights reserved.
//

#import "MSFinghtActionInfo.h"

@implementation MSFinghtActionInfo

+ (instancetype)infoWithHeroType:(MSHeroModel)heroType {
    MSFinghtActionInfo *info = [[MSFinghtActionInfo alloc] init];
    info.actionDuration = 0.1;
    info.spriteTop = 15;
    
    switch (heroType) {
        case MSHeroModel_A:
            info.goBeigin = 4;
            info.goEnd = 11;
            info.backBeigin = 17;
            info.backEnd = 21;
            info.maxPage = 29;
            info.actionDuration = 0.08;
            break;
            
        case MSHeroModel_B:
            info.goBeigin = 8;
            info.goEnd = 10;
            info.backBeigin = 14;
            info.backEnd = 16;
            info.maxPage = 18;
            info.actionDuration = 0.13;
            info.spriteTop = 49;
            break;
            
        case MSHeroModel_C:
            info.goBeigin = 12;
            info.goEnd = 16;
            info.backBeigin = 20;
            info.backEnd = 24;
            info.maxPage = 29;
            info.spriteTop = 55;
            break;
            
        case MSHeroModel_D:
            info.goBeigin = 2;
            info.goEnd = 10;
            info.backBeigin = 11;
            info.backEnd = 14;
            info.maxPage = 16;
            break;
            
        case MSHeroModel_E:
            info.goBeigin = 2;
            info.goEnd = 10;
            info.backBeigin = 11;
            info.backEnd = 14;
            info.maxPage = 15;
            break;
            
        default:
            break;
    }
    
    return info;
}

+ (instancetype)infoWithEnemyType:(MSEnemyModel)enemyType {
    MSFinghtActionInfo *info = [[MSFinghtActionInfo alloc] init];
    info.actionDuration = 0.1;
    info.spriteTop = 15;
    switch (enemyType) {
        case MSEnemyModel_A:
            info.goBeigin = 9;
            info.goEnd = 12;
            info.backBeigin = 17;
            info.backEnd = 21;
            info.maxPage = 25;
            info.actionDuration = 0.08;
            break;
            
        case MSEnemyModel_B:
            info.goBeigin = 4;
            info.goEnd = 7;
            info.backBeigin = 12;
            info.backEnd = 16;
            info.maxPage = 17;
            
            info.spriteTop = 49;
            info.actionDuration = 0.13;
            break;
            
        case MSEnemyModel_C:
            info.goBeigin = 3;
            info.goEnd = 7;
            info.backBeigin = 12;
            info.backEnd = 15;
            info.maxPage = 16;
            
            info.actionDuration = 0.15;
            break;
            
        case MSEnemyModel_D:
            info.goBeigin = 4;
            info.goEnd = 12;
            info.backBeigin = 13;
            info.backEnd = 16;
            info.maxPage = 19;
            break;
            
        default:
            break;
    }
    
    return info;
}

@end
